﻿package org.openChart.sprite 
{
	import flash.geom.Point;
	
	/**
	 * The interface is used to tranfer the command to its container.
	 * 
	 * @author Chongyuan
	 */
	public interface CommandHandler 
	{
		/**
		 * The funtion is used to process the commmand.
		 * 
		 * @param	command To mark which command occurs.
		 * @param	target The sprite on which the command occurs. 
		 */
		function processCommand( command:uint, target:BaseSprite ):void;
		
		/**
		 * Process the mouse command.
		 * 
		 * @param	command The command type
		 * @param	traget The sprite on which the command occurs.
		 * @param	position The mouse position when the command occurs.
		 * @param	object The object is used to transfer some data.
		 */
		function processMouseCommand(command:uint, target:BaseSprite, position:Point, object:Object):void;
	}
	
}